﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace JXT.PrimaryKey.Batman.Validation
{
    public class ValidationException : ApplicationException
    {
        public ValidationErrorCollection Errors { get; private set; }

        public ValidationException()
        {
            Errors = new ValidationErrorCollection();
        }

        public ValidationException(string message)
            : base(message) { }

        public ValidationException(string message, ValidationErrorCollection errors)
            : base(message)
        {
            Errors = errors;
        }

        public ValidationException(string message, Exception innerException)
            : base(message, innerException) { }

        public ValidationException(string message, Exception innerException, ValidationErrorCollection errors)
            : base(message, innerException)
        {
            Errors = errors;
        }

        public ValidationException(SerializationInfo info, StreamingContext context)
            : base(info, context) { }
    }
}
